<template>
  <!-- 审核子组件 -->
  <div>
    <div class="card-box2">
      <div>资料已提交，请等待审核...</div>
      <p>将在提交后48小时内审核完毕</p>

      <div>
        <span class="default spanbtn" @click="app = true">联系客服</span>
        <span class="success spanbtn" @click="pop_text = true"
          >撤销，重新修改</span
        >
      </div>

      <!-- 弹窗 -->
      <div v-show="app" class="pop-up">
        <span>请添加客服微信</span>
        <div class="app"></div>
      </div>
    </div>
    <!-- 撤销弹窗 -->
    <div v-show="pop_text" class="pop-text">
      <p>确认撤销</p>
      <span>撤销后提交将重新排队审核</span>
      <div><span>确定撤销？</span></div>
      <div>
        <div @click="pop_text = false">取消</div>
        <div @click="last">撤销</div>
      </div>
    </div>

    <!-- 背景静止窗口 -->
    <div v-show="pop_text" class="back_ground"></div>
  </div>
</template>

<script>
// import { post } from "@/service/request.js";
export default {
  beforeCreate() {
    // post("center_region/api/travel_agency/settravelagencybasicinformation")
    //   .then((res) => {
    //     console.log(res);
    //     this.next(); // 步骤下一步
    //     let data = res.data.data;
    //     if (data.pay_status == 2) {
    //       alert("已支付");
    //     } else if (data.complete_status == 0) {
    //       //
    //     }
    //   })
    //   .catch((error) => {
    //     error;
    //   });
    // // 审核需要获取路径
    // console.log(document.URL);
  },
  data() {
    return {
      app: false,
      pop_text: false,
    };
  },
  props: ["active"],
  methods: {
    last() {
      this.$emit("activeChange", 0);
      this.pop_text = false;
    },
    next() {
      this.$emit("activeChange", 2);
    },
  },
};
</script>

<style lang='less'>
// 审核样式
.card-box2 {
  position: absolute;
  text-align: center;
  top: 16%;
  left: 50%;
  transform: translate(-50%);
  width: 50.4vw;
  padding-top: 4vh;
  padding-bottom: 2vh;

  background: #ffffff;
  box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
  opacity: 1;
  border-radius: 15px;
  & > div:not(:last-child) {
    margin-right: 0 !important;
  }
  & > div:first-child {
    margin-top: 10vh;
    font-size: 20px;
    color: black;
    font-weight: 700;
  }
  & > div:nth-child(3) {
    justify-content: center;
    margin: 6vh 0;
    display: flex;
  }
  & > p {
    margin-top: 1.5vh;
    color: #ccc;
    font-size: 14px;
  }
  .spanbtn {
    cursor: pointer;
    margin: 0 0.5vw;
    font-weight: 550;

    border-radius: 5px;
  }
  .default {
    padding: 4px 3.4vw;
    color: black;
    border: 1px solid black;
  }
  .success {
    padding: 4px 2vw;
    color: #ffffff;
    background-color: #07c160;
  }
  // 弹窗
  .pop-up {
    margin: 0 auto;
    width: 9vw;
    border-radius: 10px;
    box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
    padding: 1vh 0vw;
    margin-bottom: 1.2vh;
    .app {
      margin: 0 auto;
      height: 14vh;
      position: relative;
      left: 2px;
      width: 14vh;
      background: url("../../assets/app.png") no-repeat;
      background-size: 100% 100%;
    }
  }
}
// 修改弹窗
.pop-text {
  position: absolute;
  left: 50%;
  z-index: 8;
  top: 30%;
  transform: translate(-50%);
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
  width: 14vw;
  & span {
    font-size: 13px;
    color: black;
  }
  & > p {
    padding: 6px;
    font-size: 14px;
    color: black;
    font-weight: 550;
  }
  & > div:last-child {
    padding: 4px 0;
    border-top: 1px solid rgb(235, 230, 230);
    display: flex;
    justify-content: center;
    div {
      cursor: pointer;
      width: 50%;
    }
    & > div:first-child {
      box-sizing: border-box;
      border-right: 1px solid rgb(235, 230, 230);
    }
  }
}

.back_ground {
  position: absolute;
  left: 0;
  top: 0;
  width: 100vw;
  z-index: 6;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.3);
}
</style>